#include "fxcc/core/graph/common/Node.h"

using namespace fxcc::graph::common;

Node::Node(aiNode *node)
{
    ztclog::debug("Load node %s", node->mName.C_Str());
    Load(node->mName, m_Name);
    Load(node->mTransformation, m_Offset);

    for (int i = 0; i < node->mNumMeshes; i++)
    {
        m_Meshes.push_back(node->mMeshes[i]);
    }
    ztclog::debug("Load node mesh %s", node->mName.C_Str());


    for (int i = 0; i < node->mNumChildren; i++)
    {
        auto childNode = std::make_shared<Node>(node->mChildren[i]);
        ztclog::debug("child node name %s", childNode->m_Name.c_str());
  
        m_Childern.emplace_back(childNode);
    }
};

